home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
049b.dms
/
049b.adf
/
MORE_SOURCE_CODE
/
AJC-UNIVERSAL-FONT-ROUTINE.AMO
/
AJC-UNIVERSAL-FONT-ROUTINE.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
1KB
|
57 lines
'
' "UNIVERSAL FONT RECOGNISER"
' By Andrew Campbell 1994
'
' When you run an AMOS Professional program on an A500 the fonts
' are loaded in a completely different order to how they're loaded on
' an A1200. This can be very annoying, so I've come up with this very
' useful piece of code (easily adaptable) which loads in fonts via
' their actual NAMES rather than by confusing numbers. This way you
' can load font numbers into variables so you know which number is
' which font! Confused? Read on...
'
' The program works by examining all the fonts (as usual) then 'looking'
' for the ones you're interested in. It searches only for the first SIX
' characters and unfortunately can NOT recognise different SIZES of fonts.
'
' BUT - this code will allow you to get the fonts you need quickly and
' easily and above all - with total compatibility on older A500's!
'
' Cheers now,
' AJC
'
Global FONT,FONT_NUMBER,F$
Assign "Fonts:" To "Df0:Fonts/"
Get Disc Fonts
Ink 1,0
Curs Off : Flash Off : Hide On
Cls 0
Colour 1,$FFF
_GET_FONT["newtop"]
Text 10,50,"THIS IS NEW TOPAZ - FONT"+Str$(FONT_NUMBER)
_GET_FONT["2001.f"]
Text 10,100,"THIS IS 2001 - FONT"+Str$(FONT_NUMBER)
_GET_FONT["Ganny."]
Text 10,150,"GANNY - FONT"+Str$(FONT_NUMBER)
Repeat : Until Mouse Key
Fade 1 : Wait 15
Edit
Procedure _GET_FONT[F$]
FONT_NUMBER=0
T=Text Length(F$)
Repeat
Inc FONT_NUMBER
GOT$=Left$(Font$(FONT_NUMBER),6)
Until GOT$=F$
Set Font FONT_NUMBER
End Proc